<extend name="Base/common"/>

<block name="body">

    <script type="text/javascript">

        $(".navbar-nav li").eq(2).addClass("active");

    </script>

    <script type="text/javascript">

        var priceAjax='{:U("Home/Index/priceAjax",'','')}';        

    </script>
    

<!--        <div class="teach_page" style="background: url(__ROOT__{$tmusic['pic']|get_cover=path}) ">
            {$tmusic['detail']}
        </div>-->
     <div class="booking_title"><h1><img src="__PUBLIC__/Index/images/book_titlebg.jpg">{$CateGoryList['title']}</h1></div>
    <div class="container">
        <div class="teach_page">{$CateGoryList['detail']}</div>
        <h4>課程目錄：<volist name="courses" id="data"><a class="btn" href="#course{$data['id']}">{$data['title']}</a></volist></h4>
        <volist name="courses" id="data">
            <div class="booking_title2" id="course{$data['id']}">{$data['title']}</div>
            <div class="id" style="display:none;">{$data['id']}</div>
            <div class="row">
                <div class="col-md-7 table_content">
                    <table class="table table-border-blue" data="{$data['title']}">
                        <thead>
                            <tr>
                                <notempty name='data.address.0'><th>上課地點</th></notempty>
                                <notempty name='data.num.0'><th>班級人數</th></notempty>
                                <notempty name='data.grade.0'><th>級別</th></notempty>
                                <notempty name='data.time'><th>時間</th></notempty>
                                <notempty name='data.Hallnum.0'><th>堂數</th></notempty>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                        <notempty name='data.address.0'>
                            <td style="height: 150px">
                                <ul class="form-control table_rowtd address" id="adress">
                                    <if condition ="is_array($data['address'])">
                                        <volist name="data.address" id="vo">
                                            <li>{$vo}</li>
                                        </volist>
                                        <else/>
                                        <li>{$data['address']}</li>
                                    </if>
                                </ul>
                            </td>
                        </notempty>
                        <notempty name='data.num.0'>
                            <td>
                                <ul class="form-control table_rowtd number" id="number">
                                    <if condition ="is_array($data['num'])">
                                        <volist name="data['num']" id="vo">
                                            <li>{$vo}</li>
                                        </volist>
                                        <else/>
                                        <li>{$data['num']}</li>
                                    </if>
                                </ul>
                            </td>
                        </notempty>

                        <notempty name='data.grade.0'> 
                            <td>
                                <ul class="form-control table_rowtd level" id="level">
                                    <if condition ="is_array($data['grade'])">
                                        <volist name="data['grade']" id="vo">
                                            <li>{$vo}</li> 
                                        </volist>
                                        <else/>
                                        <li>{$data['grade']}</li>
                                    </if>
                                </ul>
                            </td>
                        </notempty>

                        <notempty name='data.time'>
                            <td>
                            <ul class="form-control table_rowtd time" id="time">
                                <if condition ="is_array($data['time'])">
                                    <volist name="data['time']" id="vo">
                                        <li>{$vo}</li>
                                    </volist>
                                    <else/>
                                    <li>{$data['time']}</li>
                                </if>
                            </ul>
                            </td>
                        </notempty>
                        <notempty name='data.Hallnum.0'>
                            <td>
                                <ul class="form-control table_rowtd class" id="class">
                                    <if condition ="is_array($data['Hallnum'])">
                                        <volist name="data['Hallnum']" id="vo">
                                            <li>{$vo}</li>
                                        </volist>
                                        <else/>
                                        <li>{$data['Hallnum']}</li>
                                    </if>
                                </ul>
                            </td>
                        </notempty>
                        </tr>
                        </tbody>
                    </table>

                    <b>*{$data['note']}</b>

                    <div class="text-right price"><span>价格(MOP)：</span><span class="price_num"></span></div>

                </div>

                <br>

                <div class="col-md-5 text-center">

                    <button class="btn btn-large bk-btn_blue" data-toggle="modal" data-target="#myModal_bk">我要預約</button>

                    <!-- <div class="bdsharebuttonbox shar">

                        <a class="bds_fbook" data-cmd="fbook" title="分享到facebook"></a><a class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>

                    </div>      
 -->

                    <div class="shar">
                        <a href="javascript:;" title="facebook分享" class="al_fb"><i class="fa fa-facebook-square"></i></a>
                        <a href="javascript:;" title="webchat分享" class="jiathis_button_weixin"><i class="fa fa-comments"></i></a>
                    </div>
                </div>

            </div>
        </volist>        

    </div>

<!--modal-->

<div class="modal fade" id="myModal_bk" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

    <div class="modal-dialog">

        <div class="modal-content">

            <div class="modal-header">

                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>

                <h4 class="modal-title text-center" id="myModalLabel">課程預約</h4>

            </div>

            <form id="form1" method="post" action="{:U('Home/Index/appointment','','')}">

            <div class="modal-body">

                

                <dl class="dl-horizontal">

                            <dt>预约课程：</dt>

                            <dd class="course_val2"></dd>

                             <input type="hidden" class="course_val" value="" name="course"  /><br>

                            <dt>上課地點：</dt>

                            <dd class="adress_val2"></dd>

                            <input type="hidden" class="adress_val" value="" name="address" /><br>

                            <dt>班級人數：</dt>

                            <dd class="number_val2"></dd>

                             <input type="hidden" class="number_val" value="" name="number"/><br>

                            <dt>級別：</dt>

                            <dd class="level_val2"></dd>

                             <input type="hidden" class="level_val" name="level"  value="" ><br>

                            <dt>堂數：</dt>

                            <dd class="class_val2"></dd>

                            <input type="hidden" class="class_val" name="class" value="" /><br>

                            <dt>時間：</dt>

                            <dd class="time_val2"></dd>

                            <input type="hidden" class="time_val" name="time" value="" /><br>

                            <dt>價格：</dt>

                            <dd class="book_val2"></dd>

                            <input type="hidden" class="book_val" name="price" value="" /> <br>

                        </dl>                

            </div>

            

                <div class="modal-body">

                    <p><input type="text" class="form-control" id="username" value="{:session('menber_auth.ccount')}" placeholder="姓名：" name="name"></p>

                    <p><input type="text" class="form-control" id="mobile" value="{:session('menber_auth.tel')}" placeholder="手機：" name="mobile"></p>

                    <p><input type="text" class="form-control" id="mobile" value="{:session('menber_auth.email')}" placeholder="郵箱：" name="email"></p> 

                    <p><input type="text" class="form-control" id="mobile" value="{:session('menber_auth.age')}" placeholder="年龄：" name="age"></p> 

                </div>

            

            <div class="modal-footer">

                <a class="btn btn-blue" id="btnsubmusic" style="width: 90%">立即提交</a>

            </div>

               </form> 

        </div>

    </div>

</div>

<script src="http://v3.jiathis.com/code/jia.js" type="text/javascript" charset="utf-8"></script>

<script>
  window.fbAsyncInit = function() {
    FB.init({
      appId      : '1638553949767051',
      xfbml      : true,
      version    : 'v2.4'
    });
  };

  (function(d, s, id){
     var js, fjs = d.getElementsByTagName(s)[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement(s); js.id = id;
     js.src = "//connect.facebook.net/en_US/sdk.js";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));

$(".al_fb").click(function () {
    var data = {
        method: 'feed',
        name: $(".booking_title").find("h1").eq(1).text(),
        description: $(".teach_page").eq(1).find("p").text(),
        link: window.location.href,
        // picture: ("http://www.lovemusic.center/" + $('.news_con').find('img').attr('src')),
        actions: [
            {name: 'lovemusic', link: 'http://www.lovemusic.center'}
        ]
    };
    FB.ui(data, function (response) {
    });
    return false;
});


</script>

<block name="footer"></block>







</block>







